package com.blovesoft.tokenup.util;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;

import com.blankj.utilcode.util.Utils;

/**
 * author: zhu.px
 * e-mail: 1271901673@qq.com
 * time  : 2018/5/28
 * desc  :
 */
public class SubUtils {

    /**
     * 复制文本到剪贴板
     *
     * @param text 文本
     */
    public static void copyText(final CharSequence text) {
        ClipboardManager clipboard = (ClipboardManager) Utils.getApp().getSystemService(Context.CLIPBOARD_SERVICE);
        clipboard.setPrimaryClip(ClipData.newPlainText("text", text));
    }

}
